<template>
	<view class="content">
		<van-button type="primary" @click="goIndex">去登录页面</van-button>
		<van-button type="info" @click="goPay">去支付页面</van-button>
		<van-button type="warning" @click="goMap">去地图页面</van-button>
		<navigator animation-type="pop-in" animation-duration="300" url="../map/map">navigator</navigator>
		<van-button type="danger" @click="getOpenLocation">吊起内置地图</van-button>
		<van-button type="default" @click="goTest">测试页面</van-button>
		<van-button type="primary" @click="goBing">bing页面</van-button>
		<van-button type="info" @click="goLiving">去直播</van-button>
		<van-button type="primary" @click="goVant">vant页面</van-button>
		<van-button type="danger" @click="goShare">去分享页面</van-button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '',
				webviewStyles: {
					progress: {
						color: '#FF3333'
					}
				}
			}
		},
		onLoad() {

		},
		methods: {
			goIndex (){
				uni.navigateTo({
					url:"../login/login"
				})
			},
			goPay (){
				 uni.navigateTo({
				 	url:'../payment/payment'
				 })
			},
			goMap (){
				uni.navigateTo({
					url:'../map/map'
				}) 
			},
			getOpenLocation (){
				 uni.getLocation({
				     type: 'gcj02', //返回可以用于uni.openLocation的经纬度
				     success: function (res) {
				         const latitude = res.latitude;
				         const longitude = res.longitude;
						 console.log(latitude);
						 console.log(longitude)
				         uni.openLocation({
				             latitude: latitude,
				             longitude: longitude,
				             success: function () {
				                 console.log('success');
				             }
				         });
				     }
				 });
			},
			goBing (){
				uni.navigateTo({
					url:'../bing/bing'
				})	
			},
			getIamge (){
				uni.chooseImage({
				    count: 6,
				    sizeType: ['original', 'compressed'],
				    sourceType: ['album'],
				    success: function(res) {
				        // 预览图片
				        uni.previewImage({
				            urls: res.tempFilePaths,
				            longPressActions: {
				                itemList: ['发送给朋友', '保存图片', '收藏'],
				                success: function(data) {
				                    console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
				                },
				                fail: function(err) {
				                    console.log(err.errMsg);
				                }
				            }
				        });
				    }
				    });
			},
			goTest (){
				uni.navigateTo({
					url:'../test/test'
				})
			},
			goLiving (){
				uni.navigateTo({
					url:'../living/living'
				})
			},
			goVant (){
				uni.navigateTo({
					url:'../vant/vant'
				})
			},
			goShare () {
				uni.navigateTo({
					url:'/pages/share/share'
				})		
			}
			
		}
	}
</script>

<style>
	.content {
		/* display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center; */
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
	image{
		width: 80rpx;
		 height: 80rpx;
		 margin-top:100rpx;
	}
</style>
